﻿using System;
using FSM;

namespace Procedure
{
    /// <summary>
    /// 流程管理器接口
    /// </summary>
    public interface IProcedureManager
    {
        /// <summary>
        /// 获取当前流程
        /// </summary>
        ProcedureBase CurrentProcedure { get; }

        /// <summary>
        /// 获取当前流程持续时间
        /// </summary>
        float CurrentProcedureDurationTime { get; }

        /// <summary>
        /// 初始化流程管理器
        /// </summary>
        /// <param name="fsmManager"></param>
        /// <param name="procedure"></param>
        void Initialize(IFsmManager fsmManager, params ProcedureBase[] procedure);

        /// <summary>
        /// 开始流程
        /// </summary>
        /// <typeparam name="T">要开始的流程类型</typeparam>
        void StartProcedure<T>() where T : ProcedureBase;

        /// <summary>
        /// 开始流程
        /// </summary>
        /// <param name="procedureType"></param>
        void StartProcedure(Type procedureType);

        
        /// <summary>
        /// 是否存在流程
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        bool HasProcedure<T>() where T : ProcedureBase;
        
        /// <summary>
        /// 是否存在流程
        /// </summary>
        /// <param name="procedureType"></param>
        /// <returns></returns>
        bool HasProcedure(Type procedureType);


        /// <summary>
        /// 获取流程
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        ProcedureBase GetProcedure<T>() where T : ProcedureBase;

        /// <summary>
        /// 获取流程
        /// </summary>
        /// <param name="procedureType"></param>
        /// <returns></returns>
        ProcedureBase GetProcedure(Type procedureType);


























    }
}